import { NewsSaveList } from "../action/actionTypes";

const initialState = {
  newsList: [],
};

const newsReducer = (state = initialState, { type, payload }) => {
  switch (type) {
    // 3. reducer完成修改计算
    case NewsSaveList:
      return { ...state, newsList: payload };
    default:
      return state;
  }
};

export default newsReducer;
